1. Field of the Invention
The invention relates generally to computer systems and more particularly to systems and methods for preventing conflicts in a media library system, wherein multiple hosts may attempt to access the same medium at the same time.
2. Background of the Invention
Computer systems may utilize various media to store information. Data that is currently being processed is typically stored in the computers"" RAM. Storage of data in RAM is, however, temporary and the amount of data that can be stored in RAM is limited. Data that is not currently being processed by a computer may have to be stored elsewhere. For example, hard disk drives are typically installed in workstations to provide persistent storage for larger amounts of data.
Even larger amounts of data may be maintained on separate storage devices that are coupled to the computers. These storage devices may include more expensive disk drives with greater capacity than internal drives or, if the data need not be accessed quickly, tape drives or other removable-media devices can be used. Typically, these devices are employed in a network environment, where they can be used by a number of workstations. The storage devices may form what is referred to as a storage area network (SAN).
When a removable-media device such as a tape drive is used, the storage capacity is limited only by the number of tapes that are available. The tape drive system may therefore be considered a tape library. The tapes are typically contained in tape cartridges. The tape library typically contains multiple cartride slots in which tape cartridges can be stored. In an automated tape library system, the tapes are physically moved between cartridge slots and tape drives by a robotic mechanism. This mechanism is controlled by access commands received from the host devices on the network. When specific data is desired, the host device determines which cartridge slot contains the tape that holds the desired data. The host device then transmits a move-element or exchange-element command to the tape library. In response to the move-element or exchange-element command, the robotics controller moves the tape cartridge from the specified cartridge slot to the specified tape drive. The tape drive, under control of the application, then advances (or rewinds) the tape to the appropriate location, reads the data and returns the data to the host device. Data is written to the tapes in a similar fashion.
The operation of the tape library system gives rise to potential problems. For instance, two or more hosts may attempt to access the same cartridge slot at the same time, but for data at different locations on the tape. In this situation, there is a conflict and the tape library system must somehow resolve the issue of which host""s access request the system will respond to. The conflict becomes even more apparent when the tape library system has more than one tape drive. The system then has to resolve not only the question of which access request to respond to, but also which tape drive the tape should be loaded into.
These issues may be dealt with in software if the hosts use the same application or at least compatible applications. For example, if two hosts use the same backup application to store their data to tape, the application can coordinate the access requests of the two hosts so that both are backed up to the tape library. If, on the other hand, the two hosts use different backup applications, the applications will most likely not be able to coordinate their actions to ensure that both of the hosts are properly backed up, since they were probably independently designed and are consequently incompatible.
Because networks often include host devices that run different, incompatible applications, it would be desirable to provide a mechanism for coordinating their functions in relation to the accessing of cartridge slots within media libraries, or at least resolving the potential conflicts that may arise.
One or more of the problems outlined above may be solved by the various embodiments of the invention. Broadly speaking, the invention comprises systems and methods for preventing conflicts in a media library system, wherein multiple hosts may attempt to access the same element (e.g., cartridge slot) at the same time. This is accomplished by defining a plurality of pools, each of which is associated with a corresponding subset of the hosts and a corresponding subset of the elements in the library. It is assumed that all of the hosts associated with a given pool have compatible software applications or some other means for preventing or resolving conflicts among them. Each host is then allowed to access only the subset of the elements in the library that are associated with the same pool as the host.
It should be noted that the term xe2x80x9celementxe2x80x9d is used throughout this disclosure to refer to cartridge slots (storage elements) and slots used to insert or withdraw cartridges (import/export elements) in the tape library systems described herein. In other embodiments, the elements may be different types of media or media slots. These types of elements (slots) may be partitioned or assigned to pools as described below.
One embodiment of the invention comprises a device that operates as a filter and is configured to be located between a SAN and a tape library. The device comprises a controller that is coupled to a memory, a buffer, and two interfaces. One interface is configured to be coupled to a first transport medium, such as a Fibre Channel fabric of a SAN. The other interface is configured to be coupled to the tape library. Access commands directed to the tape library are received via the first interface and are stored in a buffer. The controller examines the received commands and determines whether to pass or reject the individual commands based upon configuration information stored in the memory. The configuration information defines the relationships between the pools and the hosts and tapes with which they are associated. If the controller determines that a received access command is targeted to an element that is associated with the same pool as the host that generated the command, the controller passes the command from the buffer through the second interface to the tape library. (The controller may be required to modify the command, depending upon its type.) If the controller determines that the received command is not targeted to an element that is associated with the same pool, the command is discarded. In this case, the controller may be configured to return an error message to the host to notify it that the command was rejected.
In an alternative embodiment, the hosts cannot see all of the elements in the library, but can only see (and access) those in the same pool. In this embodiment, a library partitioning device can be configured to control access to the elements by mapping a set of logical or virtual elements to a corresponding set of physical elements. In this embodiment, the hosts only see the set of elements that they are authorized to access (i.e., the ones in the same pool). Different hosts may thereby access what is seen by each as the same element, when in reality, each host is accessing a different element (assuming the hosts are associated with different pools).
Another alternative embodiment of the invention comprises a method for resolving conflicts among hosts that may attempt to access the same element in a tape library at the same time. In this method, each of the hosts coupled to the library is first assigned to (or associated with) a particular pool. Each pool may have multiple hosts associated with it. On the other hand, it may have a single host, or no host at all associated with it. Each host, however, is associated with only one pool. Each element is also assigned to one of the pools. More than one element may be assigned to a particular pool, or no elements may be assigned to that pool. Again, each element is assigned to only one pool. After the hosts and elements are associated with the appropriate pools, the hosts are allowed to access the elements in the pool with which they are associated. Other access requests are rejected.
Another embodiment of the invention comprises a software application. (xe2x80x9cSoftwarexe2x80x9d is used herein to refer to program instructions, and is intended to include firmware.) The software application is embodied in a computer-readable medium such as a floppy disk, CD-ROM, DVD-ROM, RAM, ROM, database schemas and the like. The computer readable medium contains instructions which are configured to cause a computer to execute a method which is generally as described above. It should be noted that the computer readable medium may comprise a RAM or other memory which forms part of a computer system. The computer system would thereby be enabled to perform a method in accordance with the present disclosure and is believed to be within the scope of the appended claims.
Numerous additional alternative embodiments are also possible.